#ifndef WIDGET_H
#define WIDGET_H

#include <QtWidgets>
#include <QtWebEngineWidgets>

class Widget : public QWidget
{
    Q_OBJECT

public:
    Widget(QWidget *parent = nullptr);
    ~Widget();

    void setWebChannel(QWebChannel *channel);
    QString processReceivedText(const QString &text);
    void loadWebPage();
signals:
    void sendText(const QString &text);

private slots:
    void send();
private:
    void setupUi();

    QLabel *m_l_qtTitle;
    QLineEdit *m_le;
    QTextEdit *m_te;
    QPushButton *m_pb;
    QWebEngineView *m_view;
    QWebEnginePage *m_page;
};

#endif // WIDGET_H
